package com.ruoyi.tenant.mapper;

import com.ruoyi.house.mapper.dao.BaseDao;
import com.ruoyi.tenant.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 系统用户
 * 


 * @date 2016年9月18日 上午9:34:11
 */
@Mapper
public interface SysUserDao extends BaseDao<SysUserEntity> {
	
	/**
	 * 查询用户的所有权限
	 * @param userId  用户ID
	 */
	List<String> queryAllPerms(Long userId);
	
	/**
	 * 查询用户的所有菜单ID
	 */
	List<Long> queryAllMenuId(Long userId);
	
	/**
	 * 根据用户名，查询系统用户
	 */
	SysUserEntity queryByUserName(String username);
	
	/**
	 * 修改密码
	 */
	int updatePassword(Map<String, Object> map);

	SysUserEntity getSysUserTwo(SysUserEntity user);
	
	SysUserEntity getSysUserByMobileTwo(String mobile);
	
	SysUserEntity getSysUser(SysUserEntity user);
	
	SysUserEntity getSysUserByMobile(String mobile);

	void register(SysUserEntity register);

	int updatePasswordByMobile(Map<String, Object> map);

	void updateUser(SysUserEntity sysUserEntity);

    List<SysUserEntity> queryAdmins(List<Long> deptIds);
    
    void updateUserPassword(SysUserEntity sysUserEntity);

	SysUserEntity queryObject(Integer userId);
}
